import { ApiProperty } from '@nestjs/swagger'
import { IsString, MaxLength, IsDecimal, IsInt } from 'class-validator'

export class editAddressDto {
  @ApiProperty({
    description: '省地址Code',
  })
  'province_code': string

  @ApiProperty({
    description: '市地址Code',
  })
  'city_code': string

  @ApiProperty({
    description: '区地址Code',
  })
  'country_code': string

  @ApiProperty({
    description: '具体地址',
  })
  'address': string

  @ApiProperty({
    description: '收货人姓名',
  })
  'name': string

  @ApiProperty({
    description: '手机号',
  })
  'phone': string

  @ApiProperty({
    description: '是否默认地址',
  })
  'isDefault': boolean
}

export class addAddressFromWechatDto {
  @ApiProperty({
    description: '省地址',
  })
  'province_name': string

  @ApiProperty({
    description: '市地址',
  })
  'city_name': string

  @ApiProperty({
    description: '区地址',
  })
  'country_name': string

  @ApiProperty({
    description: '具体地址',
  })
  'address': string

  @ApiProperty({
    description: '收货人姓名',
  })
  'name': string

  @ApiProperty({
    description: '手机号',
  })
  'phone': string
}

export class addressListDto extends addAddressFromWechatDto {
  @ApiProperty({
    description: '省地址Code',
  })
  'province_code': string

  @ApiProperty({
    description: '市地址Code',
  })
  'city_code': string

  @ApiProperty({
    description: '区地址Code',
  })
  'country_code': string
}

export interface addressToCode {
  address: string
}
